I am having some strange difficulties and can not figure it out. I wrote 2 scripts A and B. Script A sends emails to the user who configured a baseline whenever someone signs an electronic signature on that baseline. Script B sends emails to users configured for electronic signatures. Both of these scrips work fine on their own but only script A works in the trigger. I don't understand why B works fine in the dxl environment but not the trigger, especially since there are hardly any differences between A and B. I have attached the scripts if anybody can do me a favor and take a quick look at them. Thank you!
|
Re: Why doesn't this trigger do anything? Attachments attachment_14676283_BaseLineTrigger.zip |
Re: Why doesn't this trigger do anything? TheDrizzle - Thu Aug 25 14:02:20 EDT 2011 Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Why doesn't this trigger do anything? Mathias Mamsch - Thu Aug 25 15:29:40 EDT 2011 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS ... and needs to find and delete the trigger before trying to re-install it. Since the trigger is already there then installing it again does NOT udpate the DXL. |
Re: Why doesn't this trigger do anything? llandale - Thu Aug 25 17:29:01 EDT 2011 |
Re: Why doesn't this trigger do anything? TheDrizzle - Fri Aug 26 08:57:16 EDT 2011 At home with no DOORS and no code samples. A typical Trigger Deploy script can look like this:
string NameTrig = "Whatever"
string DxlCode = ""
if (The code is stored in some other file)
then DxlCode = readFile("c:/MyDoorsStuff/MyDxlCode/Trigger_Whatever.dxl")
else DxlCode =
" code the trigger here, backslash-escaping all the double quotes and the backslashes
" // end DxlCode
if (null DxlCode) file name wrong I guess; halt
string ErrMess = checkDxl(DxlCode)
if (!null ErrMess)
{ report DxlCode interpret errors, and ErrMess
halt
}
Trigger trg
for trigger in Module/Project/Database do
{ if (name(trg) == NameTrg)
{ if (confirm("Remove Trig '" NameTrig "'??"))
then delete(trg)
else halt // do not attempt to install without first deleting
}
}
if (confirm("Install Trigger '" NameTrig "'?"))
then trg = trigger(whatever)
Trigger trg
for trg in (current Module) do
{ gather info about trigger, stringOf(event(trg)) etc, and its name
if (confirm("Delete Trigger:\n" Info)) delete(trg)
else print NameTrit "\t" Info "\n"
}
|